Skip to content

Add implementation specific attributes#447

Closed
collinoc wants to merge 1 commit intoapache:mainfrom
collinoc:impl-specific-attrs
Closed

Add implementation specific attributes#447
collinoc wants to merge 1 commit intoapache:mainfrom
collinoc:impl-specific-attrs

Conversation

@collinoc
Copy link

Which issue does this PR close?

Closes #446.

Rationale for this change

Currently there seems to be no support for applying implementation specific attributes within this API. For example with a aws_store.put_opts(...) call, there would be no way to specify a x-amz-object-lock-mode attribute, or applying x-goog-storage-class for a GCP put operation. This adds support for such use cases.

What changes are included in this PR?

Expands the Attribute enum to include a Other variant that will add headers with implementation specific prefixes (x-amz- for AWS, etc.)

Are there any user-facing changes?

Yes, documentation was updated where I thought needed. Let me know if more is needed.

These changes should be backwards compatible.

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whilst I can appreciate the flexibility this would offer, I am somewhat concerned about the potentially hard to reason about interactions with other attributes... In particular if I specify Attribute::Other("meta-") the outcome will end up implementation defined based on whether ${IMPL_DEFINED_ATTR_HEADER_PREFIX}-meta- happens to map to Attribute::Metadata.

Similarly this somewhat breaks the design principal that attributes should roundrip or be rejected...

I wonder if we might instead just add support for the attributes you wish to support, i.e. lock mode and storage class?

@tustvold tustvold mentioned this pull request Aug 6, 2025
@tustvold tustvold closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support implementation-specific attributes

2 participants